<%--
 *  File:    ControlGLAccountInfoHeader.jsp
 *  @Author: Stephen Liu
 *  Date:    Sunday, January 18, 2004

 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType ="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  Category cat = Category.getInstance("jsp.ControlGLAccountInfoHeader");
  String strModuleName = "GL";
  String privilegeCode = "40109";
%>

<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/SessionTimeout.inc" %>
<%@ include file="/inc/Security.inc" %>

<html>
<head>
<title>controlglaccounteditheader</title>
<PageFlow:CheckPageFlow pageName="controlglaccounteditheader"/>
<%
  HashMap glaccountinfo = (HashMap) pageContext.getAttribute("glaccountinfo");
  if (glaccountinfo == null)
    glaccountinfo = new HashMap();

  Object glaccountid = pageContext.getAttribute("glaccountid");
  if (glaccountid == null) {
    glaccountinfo.put("statusname", label.getLabelName("L_Entered"));
    pageContext.setAttribute("glaccountinfo", glaccountinfo);
  }

  HashMap booksetinfo = (HashMap) pageContext.getAttribute("booksetinfo");
  if (booksetinfo == null)
    booksetinfo = new HashMap();   

  String strJspName1 = new String();
  String strJspName2 = new String();
  String strLabel1 = new String();
  String strLabel2 = new String();
  String booksettype = request.getParameter("booksettype");
  if (booksetinfo == null)
  {
     booksettype = new String();
  }                                                      
  if (booksettype.equals("2"))
  {                                                       
      strJspName1 = "'ManagementCenterGLAccountBaseInfo.jsp'";
      strJspName2 = "'ManagementCenterGLAccountMappingInfo.jsp'";
      strLabel1 = label.getLabelName("L_GLAccountAttribute");
      strLabel2 = label.getLabelName("L_GlAccountMapping");
  }else if(booksettype.equals("4"))
  {                                                  
      strJspName1 = "'LCGLAccountBaseEdit.jsp'";
      strJspName2 = "'LCGLAccountMappingEdit.jsp'";
      strLabel1 = label.getLabelName("L_GLAccountAttribute");
      strLabel2 = label.getLabelName("L_GlAccountMapping");
  }else
  {                                                          
      strJspName1 = "'ControlGLAccountBaseInfo.jsp'";
      strJspName2 = "'ControlGLAccountControlInfo.jsp'";
      strLabel1 = label.getLabelName("L_CommonProperty");
      strLabel2 = label.getLabelName("L_ControlProperty");
  }
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript">
function page_href(obj1, obj2, pagename) {
  switchTags(obj1, obj2);
  parent.down.location.href = pagename + "?<%= OvalTools.randomURL() %>&displayflag=view&glaccountid=<%=JspHelper.filterNull( glaccountid )%>";
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<table width="100%" cellspacing="0" cellpadding="0" >
  <form name="frm" method="post" action="../Dispatcher">
    <custom:hidden property="booksettype" name="booksetinfo"/>
    <custom:hidden property="entityid" name="booksetinfo"/>
    <tr>
      <td class="title-big-b-center" colspan="2"><%= label.getLabelName("L_GLAccountMaintenance") %></td>
    </tr>
    <tr>
      <td colspan="2">
        <%= label.getLabelName("L_GLAccountCode") + label.getLabelName("L_Colon") %>
        <custom:write name="glaccountinfo" property="accountcode"/>
      </td>
    </tr>
    <tr>
      <td>
        <%= label.getLabelName("L_GLAccountName") + label.getLabelName("L_Colon") %>
        <custom:write name="glaccountinfo" property="accountname"/>
      </td>
      <td width="20%" class="td_right">
        <b><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></b>
        <custom:write name="glaccountinfo" property="statusname"/>
      </td>
    </tr>
    <tr>
      <td valign="bottom" colspan="2">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td style="PADDING-BOTTOM: 0px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px" class="black_line">
              <table border=0 cellpadding=0 cellspacing=0  width="100%">
                <tr>
                  <td class=black_line height="1"></td>
                </tr>
                <tbody>
                <tr>
                  <td bgcolor=#ffffff class=m_title>&nbsp;</td>
                </tr>
                <tr>
                  <td background=../images/<%= strLanguageCode %>/M_bg.gif bgcolor=#ffffff valign="bottom">
                    <table border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><img src="images/<%= strLanguageCode %>/M_bg.gif" width="1" height="20"></td>
                        <td class="clickred" id="Main" valign=bottom width="78" background="../images/<%= strLanguageCode %>/mark_bg.gif" onclick="javascript:page_href(this,Main,'ControlGLAccountMasterInfo.jsp')">
                          <div align="center"><%= label.getLabelName("L_BasicInfo") %></div>
                        </td>
                        <td class="hand1" valign=bottom width="78" background="../images/<%= strLanguageCode %>/mark_bg.gif" onclick="javascript:page_href(this,Main,<%=JspHelper.filterNull(strJspName1)%>)">
                          <div align="center"><%=JspHelper.filterNull(strLabel1)%></div>
                        </td>
                        <td class="hand1" valign=bottom width="78" background="../images/<%= strLanguageCode %>/mark_bg.gif" onclick="javascript:page_href(this,Main,<%=JspHelper.filterNull(strJspName2)%>)">
                          <div align="center"><%=JspHelper.filterNull( strLabel2)%></div>
                        </td>
                        <td valign="bottom">&nbsp;</td>
                        <td valign="bottom">&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                    </table>
                  </td>
                </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </form>
</table>
</body>
</html>
